解法之後補...(嘗試看懂中...
ref:https://leetcode.com/problems/count-all-valid-pickup-and-delivery-options/solutions/4024280/99-57-dp-math-recursion/?envType=daily-question&envId=2023-09-10
class Solution {
const int MOD = 1e9 + 7;
public:
int countOrders(int n) {
long long count = 1;
for(int i = 2; i <= n; i++){
count = (count * (2 * i - 1) * i) % MOD;
}
return (int)count;
}
};